<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title>待审流程管理</title>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp"%>
<script type="text/javascript">
</script>
</head>
<body>
<div class="x-panel">
<div class="x-panel-header">
  &nbsp;项目预算●
  <s:if test="#attr.isProject">【项目负责人审核】</s:if>
  <s:else>【财务审核】</s:else> 
</div>
<div class="x-toolbar">
  <s:form action="financeNodeIndex" theme="simple" id="form1">
    <s:hidden name="financeNodeType"/>
    <table>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;
          &nbsp;开始日期：
          <input id="startDate" name="startDate" size="14"  value="<s:date name='startDate' format='yyyy-MM-dd'/>" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}',skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" class="Wdate"  readonly="readonly"/>&nbsp;&nbsp;
          &nbsp;结束日期：<input id="endDate" name="endDate" size="14" value=" <s:date name='endDate' format='yyyy-MM-dd'/>" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}',skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" class="Wdate"  readonly="readonly"/>&nbsp;&nbsp;
        </td>
	    <td>&nbsp;&nbsp;&nbsp;
	      &nbsp;审批状态：
	      <s:select list='auditStatusMap' name="model.status" cssStyle="width:80px" headerKey="" headerValue="全部"></s:select>
	    </td>
	    <td>
	      <s:submit value="查询" cssClass="button" cssStyle="width:50px; margin: 0px 20px;"/>
	    </td>        
      </tr>
    </table>
  </s:form>
</div>
<div class="x-panel-body">
<ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
	    action="financeNodeIndex.do"
		useAjax="true" doPreload="false"
		maxRowsExported="10000000" 
		pageSizeList="5,10,20" 
		editable="false" 
		sortable="false"	
		rowsDisplayed="5"	
		generateScript="true"	
		resizeColWidth="true"	
		classic="false"	
		width="100%" 	
		height="450"	
		minHeight="450"
		toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	<ec:row>
	    <ec:column width="50" property="_s" title="No." value="${GLOBALROWCOUNT}" sortable="false" style="text-align:center"/>
		<ec:column width="120" property="flow.projectBudget.singleNo" title="预算编号"/>
	    <ec:column width="210" property="flow.projectBudget.project.name" title="所属项目" ellipsis="true"/>
	    <ec:column width="100" property="_amount" title="预算额" style="text-align:right;">
	      <span style="font-family: sans-serif; color: green;">${item.flow.projectBudget.amount}&nbsp;<b>&yen;</b>&nbsp;</span>
	    </ec:column>
	    <ec:column width="90" property="flow.proposer.name" title="定制人"/>
		<ec:column width="90" property="flow.projectBudget.createTime" title="定制时间" cell="date" format="yyyy-MM-dd" style="text-align:center"/>
		<s:if test="#attr.isProject">
		  <ec:column width="150" property="auditorNames" title="有权审核人" style="text-align:center" ellipsis="true"/>
		</s:if>
		<s:else>
		  <ec:column width="90" property="auditor.name" title="审核人"/>
		</s:else>
		<ec:column width="80" property="audDate" title="审核时间" cell="date" format="yyyy-MM-dd" style="text-align:center"/>
		<ec:column width="80" property="_status" title="审核状态" style="text-align:center">
		  <s:if test='#attr.item.status == "pending"'><font color="#999999">待审核</font></s:if>
		  <s:if test='#attr.item.status == "pass"'><font color="green">已通过</font></s:if>
		  <s:if test='#attr.item.status == "nopass"'><font color="red">未通过</font> </s:if>
		</ec:column>				
		<ec:column width="100" property="_0" title="操作" style="text-align:center" sortable="false">
		    <a href="${ctx}/budget/view.do?model.id=${item.flow.projectBudget.id}&enableEdit=false" target="_blank">查看</a>&nbsp;
	        <a href="#" onclick="showAuditWindow('${item.id}', '${item.status}', '${item.descn}')">审批</a> 
		</ec:column>
	</ec:row>
</ec:table>
</div>
</div>
<%@include file="/pages/rbcs/node/audit.jsp" %>

</body>
</html>